﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Common
{
    public class MessageReply
    {

        public static MessageContent GetSuceesReply(Object result = null,string count="0")
        {
            MessageContent messageContent = new MessageContent();
        
            messageContent.code = Result.Sccess;
            messageContent.data = result;
            messageContent.count = count;
            return messageContent;
        }

        public static MessageContent GetfailtureReply(string reasonCode)
        {
            MessageContent messageContent = new MessageContent();

            messageContent.code = Result.Failture;
            messageContent.msg = reasonCode.ToString();
            return messageContent;
        }

        public static MessageContent GetOtherReply(string reasonCode)
        {
            MessageContent messageContent = new MessageContent();

            messageContent.code = Result.Other;
            messageContent.msg = reasonCode.ToString();
            return messageContent;
        }
    }
}